Skip to content

fix(backlog/generate-index.ts): close .ts/.sh parity bug (squash-miss from #1399)#1400

Merged
AceHack merged 1 commit intomainfrom
fix/backlog-generate-index-ts-sh-parity-bug-redux
May 3, 2026
Merged

fix(backlog/generate-index.ts): close .ts/.sh parity bug (squash-miss from #1399)#1400
AceHack merged 1 commit intomainfrom
fix/backlog-generate-index-ts-sh-parity-bug-redux

Conversation

@AceHack
Copy link
Copy Markdown
Member

@AceHack AceHack commented May 3, 2026

Summary

Re-apply of the .ts/.sh parity fix that didn't make it into #1399's squash-merge (auto-merge fired before the parity-fix commit propagated).

Bug: The .ts generator emitted TWO blank lines between the header prose and ## P0; the .sh canonical generator emits ONE.

Fix: Removed the redundant out.push("") after the prose. The per-tier loop's leading out.push("") is the canonical separator, matching .sh.

Verification

  • ./tools/backlog/generate-index.sh --check → ok
  • bun tools/backlog/generate-index.ts --check → ok
  • diff between the two stdout outputs is empty (full byte-level parity)

Discipline lesson

Parity-debt is invisible until both implementations run on the same input. The .ts ported in #885 had this latent drift; surfaced via CI's .sh-check on #1399.

Test plan

  • Both generators produce identical output (byte-level diff confirmed)
  • Existing committed BACKLOG.md matches both generators

🤖 Generated with Claude Code

…nk between header prose and first section

Re-apply of the fix that didn't make it into #1399's squash-merge
(auto-merge fired before the parity-fix commit propagated).

**Bug:** the .ts generator emitted TWO blank lines between
the header prose ("are closed (status: closed in frontmatter)._")
and the first section header (`## P0`), while the .sh canonical
generator emits ONE.

**Root cause:** the .ts had `out.push("")` immediately after the
prose AND another `out.push("")` at the start of the per-tier
loop. The .sh has only the heredoc's trailing newline + the tier
loop's single `echo ""`. Two pushes vs one push = one extra blank
line in the joined output.

**Fix:** removed the redundant `out.push("")` after the prose.
The per-tier loop's leading `out.push("")` is the canonical
separator, matching .sh. Comment added at the removal site
explaining why (prevents future-Otto from re-adding it as a
"missing blank line" cosmetic improvement).

**Verification post-fix:**

  - `./tools/backlog/generate-index.sh --check` → ok
  - `bun tools/backlog/generate-index.ts --check` → ok
  - `diff` between the two stdout outputs is empty (full
    byte-level parity)

This closes the .sh→.ts parity-debt finding from the migration
substrate. The .ts ported in #885 had this latent bug; surfaced
when CI's .sh-check ran against my .ts-regenerated index in
#1399.

Discipline lesson: parity-debt is invisible until both
implementations run on the same input. The chain-of-events:
#885 ported .sh→.ts with subtle drift; .sh stayed canonical
for CI; #1399 used .ts for regeneration; CI's .sh-check caught
the drift; reviewer flagged it; #1399 fix used .sh; this PR
closes the .ts side so future agents can use either
generator interchangeably.
Copilot AI review requested due to automatic review settings May 3, 2026 12:52
@AceHack AceHack enabled auto-merge (squash) May 3, 2026 12:52
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Aligns the TypeScript backlog index generator’s output with the canonical Bash generator to eliminate a formatting parity drift that caused an extra blank line before the first tier header.

Changes:

  • Removed an extra out.push("") after the header prose to avoid emitting two blank lines before the first ## P0 section.
  • Added an explanatory comment documenting why the blank line is intentionally omitted to preserve .ts/.sh byte-level parity.

@AceHack AceHack merged commit 0f04257 into main May 3, 2026
30 checks passed
@AceHack AceHack deleted the fix/backlog-generate-index-ts-sh-parity-bug-redux branch May 3, 2026 12:55
AceHack added a commit that referenced this pull request May 3, 2026
…6-05-03 EOD progress (#1402)

Reflects substantive progress this session across the math-proofs
honest assessment matrix. Key state changes:

**P0 items — 3 of 3 closed:**
- Lean lake-build CI job ✓ (#1394)
- A4 registry rows ✓ (#1393)
- Peer-review email draft ✓ (#1387)
- Stryker B3 → partial (config-fix #1395; CI wire deferred to
  follow-up substantial-design)

**P1 items — significant progress:**
- Alloy B2 → A ✓ (#1396 — silent-no-op was the failure mode;
  spec-path fixed)
- Semgrep B4 → A ✓ (verify-then-claim correction; was already
  in CI)
- B1 4 deferred specs → 2 of 4 done:
  - DbspSpec ✓ #1397 (1M states / 11s)
  - CircuitRegistration ✓ #1401 (B-0180 closed; 3538 states / <1s)
  - SpineAsyncProtocol B-0179 still open (counterexample inv.)
  - SpineMergeInvariants B-0181 still open (counterexample inv.)

**Sibling work tracked:**
- Phase 0 substrate-discovery PoC ✓ (#1392 — 4.0 MB AOT binary
  on osx-arm64; cross-platform CI matrix)
- 3 broken-spec backlog rows filed (#1398 → B-0179 + B-0180 +
  B-0181); B-0180 closed (#1401)
- `.ts/.sh` parity bug in `tools/backlog/generate-index.ts`
  closed ✓ (#1400 — both generators byte-identical)

This update is bounded substrate work documenting the actual
state of the matrix; doesn't add new work, just captures
completion. Future matrix re-grades happen as work-items land
(per the assessment doc's audit-trail discipline).

Composes with #1383 (the original assessment) + every PR
referenced above.

§33 archive-header lint passes.
AceHack added a commit that referenced this pull request May 3, 2026
…ster + cache-clobber discipline encoded (#1408)

Substantial multi-tick session shard. 18 PRs touched (#1383 + #1387
+ #1392-#1407 inclusive); 14 merged + 4 in-flight as of shard time.

**Math-proofs assessment progress** (#1383 outstanding-work matrix):
- A1+A2 → A-with-CI ✓ (#1394 Lean lake-build workflow)
- A4 registry rows ✓ (#1393)
- B1 → 2 of 4 deferred specs in CI ✓ (#1397 DbspSpec + #1401
  CircuitRegistration B-0180 closed)
- B2 Alloy → A ✓ (#1396 silent-no-op spec-path fix)
- B4 Semgrep → A ✓ (correction)
- Peer-review email template ✓ (#1387)
- Phase 0 substrate-discovery PoC ✓ (#1392)
- Stryker config-fix ✓ (#1395; CI wire deferred)
- 3 broken-spec backlog rows filed ✓ (#1398)

**Cache-clobber silent-bug class discovered + fully encoded:**
B-0180 fix passing locally + failing CI → verify-then-claim
identified gate.yml + low-memory.yml caching whole tools/tla and
tools/alloy directories. Fix cluster: #1403 (gate.yml) + #1404
(low-memory.yml + audit-ci-cache-paths.ts) + #1406 (CI lint gate)
+ #1407 (memory file + bug-locus disambiguation per Aaron's 'real
github bug?' question — answer: usage-bug, not tool-bug).

**Other substrate work:** #1399 BACKLOG.md regen, #1400 .ts/.sh
parity bug, #1402 assessment matrix doc update, #1405 B-0182
backlog row (Linux-only formal verification — orthogonal-axes
split per Aaron 2026-05-03).

**Discipline lessons captured:** chat-is-assertion-channel,
substrate-corrections-cluster, search-first-before-architectural-
expansion, verify-then-claim CI fidelity, documentation-is-
current-state-not-history.

Carved sentence: 'When a lucky catch surfaces a class of bug,
build the structural fix that eliminates the luck — audit + lint
gate + carved-sentence rule + memory file.'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants